package com.liangtian.mdm.dm.jsp.common;

import com.liangtian.mdm.dm.config.model.AttrConfig;

import java.util.List;

public class CodeBlock {

    // 提交前调用方法，生成自定义编码的实际值
    public static String callAutoCodeFunction(List<AttrConfig> configLst) {
        String code = "";
        for (AttrConfig ac : configLst) {
            if ("4".equals(ac.getModuleType())) {
                if ("1".equals(String.valueOf(ac.getSetCodeTime()))) {
                    code += "  $scope.genAutoCode" + ac.getAttrColumn().toLowerCase() + "(); \r\n";
                }
            }
        }
        return code;
    }

}
